<template>
  <div>
    <!-- 顶部标签栏 -->
    <van-nav-bar title="标题" left-text="返回" class="top">
      <template #title>
        <span>我的收藏</span>
      </template>
      <template #left>
        <span @click="$router.back()">返回</span>
      </template>
    </van-nav-bar>
    <findItem :roomList="list"></findItem>
  </div>
</template>

<script>
import findItem from "@/components/findItem.vue";
import request from "@/utils/request";
export default {
  name: "VueHkzfShoucang",
  components: {
    findItem,
  },
  data() {
    return {
      list: [],
    };
  },

  mounted() {
    this.getList();
  },

  methods: {
    async getList() {
      const res = await request({
        url: "/user/favorites",
      });
      this.list = res.data.body;
      console.log(res);
    },
  },
};
</script>

<style lang="less" scoped>
.van-nav-bar {
  background-color: #58b67f;
}
</style>
